package com.woolink.per.common;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;

import com.opensymphony.xwork2.ActionSupport;

/**
 * 
 * @author wuliquan
 * @version 2013-12-10
 * @see BaseAction
 * @since
 */
public class BaseAction extends ActionSupport implements ServletRequestAware
{
    /**
     * 意义，目的和功能，以及被用到的地方<br>
     */
    private static final long serialVersionUID = 1L;
    
    public static final String FLAG_INDEX = "index";
    
    public static final String FLAG_POTAL = "potal";
    
    public static final String FLAG_LIST = "list";
    
    public static final String FLAG_TOLOGIN = "tologin";
    
    public static final String FLAG_SESSION_TIMEOUT = "sessionTimeOut";
    
    
    /**
     * 分页信息
     */
    protected Page page;
    
    /**
     * 查询条件
     */
    protected QueryCondition queryCondition;
    
    /**
     *  Http请求对象
     */
    protected HttpServletRequest request;
    
    /**
     *  Http响应对象
     */
    protected HttpServletResponse response;
    
    /**
     *  结果集
     */
    @SuppressWarnings("rawtypes")
    protected List resultList;
    
    /**
     * 返回消息
     */
    protected String message;
    
    /**
     *  是否操作成功
     */
    protected Integer actResult = Constants.ACTRESULT_DEF;
    
    /**
     *  ID
     */
    protected Integer innerIndex;
    
    /**
     * ID集合
     */
    protected Integer[] innerIndexs;
    
    protected Map params;
    
    /**
     * @return Returns the page.
     */
    public Page getPage()
    {
        return page;
    }

    /**
     * @param page The page to set.
     */
    public void setPage(Page page)
    {
        this.page = page;
    }

    /**
     * @return Returns the queryCondition.
     */
    public QueryCondition getQueryCondition()
    {
        return queryCondition;
    }

    /**
     * @param queryCondition The queryCondition to set.
     */
    public void setQueryCondition(QueryCondition queryCondition)
    {
        this.queryCondition = queryCondition;
    }

    /**
     * @return Returns the request.
     */
    public HttpServletRequest getRequest()
    {
        return request;
    }

    /**
     * @param request The request to set.
     */
    public void setRequest(HttpServletRequest request)
    {
        this.request = request;
    }

    /**
     * @return Returns the response.
     */
    public HttpServletResponse getResponse()
    {
        return response;
    }

    /**
     * @param response The response to set.
     */
    public void setResponse(HttpServletResponse response)
    {
        this.response = response;
    }

    /**
     * @return Returns the resultList.
     */
    public List getResultList()
    {
        return resultList;
    }

    /**
     * @param resultList The resultList to set.
     */
    public void setResultList(List resultList)
    {
        this.resultList = resultList;
    }

    /**
     * @return Returns the message.
     */
    public String getMessage()
    {
        return message;
    }

    /**
     * @param message The message to set.
     */
    public void setMessage(String message)
    {
        this.message = message;
    }

    /**
     * @return Returns the actResult.
     */
    public Integer getActResult()
    {
        return actResult;
    }

    /**
     * @param actResult The actResult to set.
     */
    public void setActResult(Integer actResult)
    {
        this.actResult = actResult;
    }

    /**
     * @return Returns the innerIndex.
     */
    public Integer getInnerIndex()
    {
        return innerIndex;
    }

    /**
     * @param innerIndex The innerIndex to set.
     */
    public void setInnerIndex(Integer innerIndex)
    {
        this.innerIndex = innerIndex;
    }

    /**
     * @return Returns the innerIndexs.
     */
    public Integer[] getInnerIndexs()
    {
        return innerIndexs;
    }

    /**
     * @param innerIndexs The innerIndexs to set.
     */
    public void setInnerIndexs(Integer[] innerIndexs)
    {
        this.innerIndexs = innerIndexs;
    }

    /**
     * @return Returns the params.
     */
    public Map getParams()
    {
        return params;
    }

    /**
     * @param params The params to set.
     */
    public void setParams(Map params)
    {
        this.params = params;
    }

    @Override
    public void setServletRequest(HttpServletRequest request)
    {
        this.request = request;
        
    }
    
}
